from django.db import models


# app_label = 'app02'
# Create your models here.
class User(models.Model):
    name = models.CharField(max_length=32)
    age = models.IntegerField()
    # 当表已经同步 添加额外的字段 设置一个参数null=True 或者设置默认值
    join_time = models.DateField(auto_now_add=True, null=True)

    def __str__(self):
        return f'用户对象{self.name}'

class App02Book(models.Model):
    title = models.CharField(max_length=32)


